package com.wicket.okrbff.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrbff.biz.service.TimingTaskService;

import com.wicket.okrbff.common.ro.OkrResult;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.*;
import com.wicket.okrapp.integration.FwAppTimingTaskClient;
import com.wicket.okrapp.integration.dto.LoopSetAncestorParentStateComRespDto;
import com.wicket.okrapp.integration.dto.LoopSetAncestorParentStateComReqDto;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrapp.integration.dto.TimingAddSimpleAddReportTaskRespDto;
import com.wicket.okrapp.integration.dto.TimingAddSimpleAddReportTaskReqDto;
import com.wicket.okrapp.integration.dto.DeleteComRespDto;
import com.wicket.okrapp.integration.dto.DeleteComReqDto;
import com.wicket.okrapp.integration.dto.DeleteTargetCatBasicInfoComRespDto;
import com.wicket.okrapp.integration.dto.DeleteTargetCatBasicInfoComReqDto;
import com.wicket.okrapp.integration.dto.RefreshFourTreeDeviationDaysEtcComRespDto;
import com.wicket.okrapp.integration.dto.RefreshFourTreeDeviationDaysEtcComReqDto;
import com.wicket.okrapp.integration.dto.RefreshStageCurrentCycleEtcComRespDto;
import com.wicket.okrapp.integration.dto.RefreshStageCurrentCycleEtcComReqDto;
import com.wicket.okrbff.common.util.CommonFunctionHelper;
import com.wicket.okrapp.integration.dto.RefreshTaskOverdueEtcComRespDto;
import com.wicket.okrapp.integration.dto.RefreshTaskOverdueEtcComReqDto;
import com.wicket.okrapp.integration.FwAppDivineDataClient;
import com.wicket.okrapp.integration.FwAppTaskClient;
import com.wicket.okrapp.integration.FwAppTargetCycleClient;
import com.wicket.okrapp.integration.FwAppTaskGenClient;
import com.wicket.okrapp.integration.dto.ImplementTimingTaskAcceptParametersRespDto;
import com.wicket.okrapp.integration.dto.ImplementTimingTaskAcceptParametersReqDto;
import com.wicket.okrapp.integration.dto.GenerateTargetReportTasksComRespDto;
import com.wicket.okrapp.integration.dto.GenerateTargetReportTasksComReqDto;
import com.wicket.okrapp.integration.dto.AddDepMisStaTargetPresentLeafComRespDto;
import com.wicket.okrapp.integration.dto.AddDepMisStaTargetPresentLeafComReqDto;
import com.wicket.okrapp.integration.dto.RefreshTargetContCycleEtcPlanNameComRespDto;
import com.wicket.okrapp.integration.dto.RefreshTargetContCycleEtcPlanNameComReqDto;
import com.wicket.okrapp.integration.dto.ImplementOkrPersonalTreeHandleComRespDto;
import com.wicket.okrapp.integration.dto.ImplementOkrPersonalTreeHandleComReqDto;
import com.wicket.okrapp.integration.dto.CalculateTaskReportStandardDataComRespDto;
import com.wicket.okrapp.integration.dto.CalculateTaskReportStandardDataComReqDto;
import com.wicket.okrapp.integration.dto.ImplementDispatchDeleteTargetObjBasicInfoComRespDto;
import com.wicket.okrapp.integration.dto.ImplementDispatchDeleteTargetObjBasicInfoComReqDto;
import com.wicket.okrapp.integration.dto.ImplementDispatchDeleteTargetCatBasicInfoComRespDto;
import com.wicket.okrapp.integration.dto.ImplementDispatchDeleteTargetCatBasicInfoComReqDto;
import com.wicket.okrapp.integration.dto.RefreshFourTreeDeviationDaysDispatchComRespDto;
import com.wicket.okrapp.integration.dto.RefreshFourTreeDeviationDaysDispatchComReqDto;
import com.wicket.okrapp.integration.FwAppEvaThemeClient;
import com.wicket.okrapp.integration.dto.RefreshAllStageCurrentCycleComRespDto;
import com.wicket.okrapp.integration.dto.RefreshAllStageCurrentCycleComReqDto;
import com.wicket.okrapp.integration.dto.ImplementTempCloneResultEtcComRespDto;
import com.wicket.okrapp.integration.dto.ImplementTempCloneResultEtcComReqDto;
import com.wicket.okrapp.integration.dto.BatchRefreshTargetContentDeviationDaysEtcComRespDto;
import com.wicket.okrapp.integration.dto.BatchRefreshTargetContentDeviationDaysEtcComReqDto;
import com.wicket.okrapp.integration.dto.BatchSetRecalculateWeightScoreComRespDto;
import com.wicket.okrapp.integration.dto.BatchSetRecalculateWeightScoreComReqDto;
import com.wicket.okrapp.integration.dto.ImplementEnableSpaceEverYoungDispatchMqComRespDto;
import com.wicket.okrapp.integration.dto.ImplementEnableSpaceEverYoungDispatchMqComReqDto;
import com.wicket.okrapp.integration.dto.ImplementAnalyseDogBoneResidueRespDto;
import com.wicket.okrapp.integration.dto.ImplementAnalyseDogBoneResidueReqDto;
import com.wicket.okrapp.integration.dto.RefreshAllTempDeviationDaysAndCurrentCycleComRespDto;
import com.wicket.okrapp.integration.dto.RefreshAllTempDeviationDaysAndCurrentCycleComReqDto;
/**
 * @author ： 
 * @date ： 
 *
 *
 * @version 1.0
 */
@Api(value = "TimingTask", tags = {"TimingTask"})
@RestController
// @RequestMapping("/oms/timingTask/")
public class TimingTaskController {
    @Autowired
    TimingTaskService timingTaskService;
/**
   * B3-循环设定祖先目标父子状态（人工真实测试）
   * gen by moon at 9/22/2022, 1:09:20 AM
   */
    @PostMapping("/oms/timingTask/loopSetTargetAncestorParentState")
    @ApiOperation(value = "B3-循环设定祖先目标父子状态（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffLoopSetTargetAncestorParentStateRespDto> loopSetTargetAncestorParentState(@RequestBody(required=false) @Validated BffLoopSetTargetAncestorParentStateReqDto reqDTO){
        return OkrResult.success(timingTaskService.loopSetTargetAncestorParentState(reqDTO));
    }
/**
   * B3-简易生成汇报任务（人工真实测试）
   * gen by moon at 10/2/2022, 9:25:09 AM
   */
    @PostMapping("/oms/timingTask/addSimpleAddReportTask")
    @ApiOperation(value = "B3-简易生成汇报任务（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffAddSimpleAddReportTaskRespDto> addSimpleAddReportTask(@RequestBody(required=false) @Validated BffAddSimpleAddReportTaskReqDto reqDTO){
        return OkrResult.success(timingTaskService.addSimpleAddReportTask(reqDTO));
    }
/**
   * B3-删除指标基本信息（人工真实测试）
   * gen by moon at 9/22/2022, 1:09:08 AM
   */
    @PostMapping("/oms/timingTask/deleteTargetObjBasicInfo")
    @ApiOperation(value = "B3-删除指标基本信息（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffDeleteTargetObjBasicInfoRespDto> deleteTargetObjBasicInfo(@RequestBody(required=false) @Validated BffDeleteTargetObjBasicInfoReqDto reqDTO){
        return OkrResult.success(timingTaskService.deleteTargetObjBasicInfo(reqDTO));
    }
/**
   * B3-删除目标分类基本信息（人工真实测试）
   * gen by moon at 9/22/2022, 1:09:12 AM
   */
    @PostMapping("/oms/timingTask/deleteTargetCatBasicInfo")
    @ApiOperation(value = "B3-删除目标分类基本信息（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffDeleteTargetCatBasicInfoRespDto> deleteTargetCatBasicInfo(@RequestBody(required=false) @Validated BffDeleteTargetCatBasicInfoReqDto reqDTO){
        return OkrResult.success(timingTaskService.deleteTargetCatBasicInfo(reqDTO));
    }
/**
   * B3-更新四棵树偏差天数等数据（人工真实测试）
   * gen by moon at 9/22/2022, 1:09:13 AM
   */
    @PostMapping("/oms/timingTask/refreshFourTreeDeviationDaysEtc")
    @ApiOperation(value = "B3-更新四棵树偏差天数等数据（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffRefreshFourTreeDeviationDaysEtcRespDto> refreshFourTreeDeviationDaysEtc(@RequestBody(required=false) @Validated BffRefreshFourTreeDeviationDaysEtcReqDto reqDTO){
        return OkrResult.success(timingTaskService.refreshFourTreeDeviationDaysEtc(reqDTO));
    }
/**
   * B3-更新子周期阶段当前周期等（人工真实测试）
   * gen by moon at 10/5/2022, 1:14:22 PM
   */
    @PostMapping("/oms/timingTask/refreshStageCurrentCycleEtc")
    @ApiOperation(value = "B3-更新子周期阶段当前周期等（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffRefreshStageCurrentCycleEtcRespDto> refreshStageCurrentCycleEtc(@RequestBody(required=false) @Validated BffRefreshStageCurrentCycleEtcReqDto reqDTO){
        return OkrResult.success(timingTaskService.refreshStageCurrentCycleEtc(reqDTO));
    }
/**
   * B3-更新末级周期阶段当前周期等（人工真实测试）
   * gen by moon at 10/4/2022, 6:12:32 PM
   */
    @PostMapping("/oms/timingTask/refreshStageEndCurrentCycleEtc")
    @ApiOperation(value = "B3-更新末级周期阶段当前周期等（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffRefreshStageEndCurrentCycleEtcRespDto> refreshStageEndCurrentCycleEtc(@RequestBody(required=false) @Validated BffRefreshStageEndCurrentCycleEtcReqDto reqDTO){
        return OkrResult.success(timingTaskService.refreshStageEndCurrentCycleEtc(reqDTO));
    }
/**
   * B3-更新任务逾期等数据（人工真实测试）
   * gen by moon at 9/22/2022, 1:09:19 AM
   */
    @PostMapping("/oms/timingTask/refreshTaskOverdueEtc")
    @ApiOperation(value = "B3-更新任务逾期等数据（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffRefreshTaskOverdueEtcRespDto> refreshTaskOverdueEtc(@RequestBody(required=false) @Validated BffRefreshTaskOverdueEtcReqDto reqDTO){
        return OkrResult.success(timingTaskService.refreshTaskOverdueEtc(reqDTO));
    }
/**
   * B3-2提交人工补偿异步调度任务(管理)
   * gen by moon at 12/22/2022, 12:26:42 AM
   */
    @PostMapping("/oms/mgt/timingTask/commitHandRescueSlowTask")
    @ApiOperation(value = "B3-2提交人工补偿异步调度任务(管理)", response = OkrResult.class)
    public OkrResult<BffCommitHandRescueSlowTaskRespDto> commitHandRescueSlowTask(@RequestBody(required=false) @Validated BffCommitHandRescueSlowTaskReqDto reqDTO){
        return OkrResult.success(timingTaskService.commitHandRescueSlowTask(reqDTO));
    }
/**
   * B3-更新四棵树偏差天数等调度（人工真实测试）
   * gen by moon at 9/28/2022, 7:15:27 AM
   */
    @PostMapping("/oms/timingTask/refreshFourTreeDeviationDaysDispatch")
    @ApiOperation(value = "B3-更新四棵树偏差天数等调度（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffRefreshFourTreeDeviationDaysDispatchRespDto> refreshFourTreeDeviationDaysDispatch(@RequestBody(required=false) @Validated BffRefreshFourTreeDeviationDaysDispatchReqDto reqDTO){
        return OkrResult.success(timingTaskService.refreshFourTreeDeviationDaysDispatch(reqDTO));
    }
/**
   * B3执行启用空间长生调度MQ(管理)
   * gen by moon at 5/14/2023, 3:05:02 AM
   */
    @PostMapping("/oms/mgt/timingTask/implementEnableSpaceEverYoungDispatchMq")
    @ApiOperation(value = "B3执行启用空间长生调度MQ(管理)", response = OkrResult.class)
    public OkrResult<BffImplementEnableSpaceEverYoungDispatchMqRespDto> implementEnableSpaceEverYoungDispatchMq(@RequestBody(required=false) @Validated BffImplementEnableSpaceEverYoungDispatchMqReqDto reqDTO){
        return OkrResult.success(timingTaskService.implementEnableSpaceEverYoungDispatchMq(reqDTO));
    }
/**
   * B3执行分析目标内容情况(管理)
   * gen by moon at 5/18/2023, 11:06:50 PM
   */
    @PostMapping("/oms/mgt/timingTask/implementAnalyseDogBoneResidue")
    @ApiOperation(value = "B3执行分析目标内容情况(管理)", response = OkrResult.class)
    public OkrResult<BffImplementAnalyseDogBoneResidueRespDto> implementAnalyseDogBoneResidue(@RequestBody(required=false) @Validated BffImplementAnalyseDogBoneResidueReqDto reqDTO){
        return OkrResult.success(timingTaskService.implementAnalyseDogBoneResidue(reqDTO));
    }

}

